package com.zrrd.Firstpackage;

public class Person_ex {
    String name;
    int age;

    public Person_ex() {
    }

    public Person_ex(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public int birth(int y) {
        return y - age + 1;
    }

    public static void main(String[] args) {
        Person_ex ps = new Person_ex("tom", 21);
        Date now = new Date();
        int y = now.thisyear();
        System.out.println(ps.name + "" + ps.birth(y));
    }
}
